package org.example.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.system.entity.SysRole;

import java.util.List;

/**
 * <p>
 * 角色 Mapper 接口
 * </p>
 *
 * @author LiJunYi
 * @since 2020-05-25
 */
@Mapper
public interface SysRoleDao extends BaseMapper<SysRole> {

    /**
     * 获取角色通过用户id
     *
     * @param userId 用户id
     * @return {@link List}<{@link SysRole}>
     */
    List<SysRole> getRolesByUserId(@Param("userId") Long userId);

    List<SysRole> getAllRoleList();
}
